﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace Gamemaster.Naming
{
    public partial class LinqNameDatabase : INameDatabase
    {
        public List<First> GetFirstNames(GenderOptions gender)
        {
            Func<First, bool> filter = n =>
                n.Gender == gender.ToString()
                || n.Gender == "Both"
                || gender == GenderOptions.Both;

            return this.Firsts.Where(filter).ToList();
        }
    }
}
